{extend name="layout:default" /}
{block name="title"}添加{/block}
{block name="content"}
<div class="box box-default">
    <div class="box-header with-border">
        <h3 class="box-title">添加活动</h3>
    </div>
    <!-- /.box-header -->
    <div class="box-body">
            <a href="{:url('index')}" class="btn btn-info">返回</a>

        <form class="form-horizontal" method="post" enctype="multipart/form-data">
            <div class="form-group">
                <label class="col-sm-2 control-label">活动名称</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="title" placeholder="活动名称">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">排序</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="sort" placeholder="排序">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">活动简介</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="introduction" placeholder="活动简介">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">限制人数</label>
                <div class="col-sm-8">
                    <input type="text" class="form-control" name="people_num" placeholder="人数">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">活动详细内容</label>
                <div class="col-sm-8">
                    <textarea id="container" name="content" cols="30" rows="15" style="width:80%; margin: 0 auto;"></textarea>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">是否热门</label>
                <div class="col-sm-10" >
                    <input type="radio" value="1" name="is_hot" checked>是
                    <input type="radio" value="2" name="is_hot">否
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">是否最新</label>
                <div class="col-sm-10" >
                    <input type="radio" value="1" name="is_new" checked>是
                    <input type="radio" value="2" name="is_new">否
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">是否放置主页</label>
                <div class="col-sm-10" >
                    <input type="radio" value="1" name="is_home" checked>是
                    <input type="radio" value="2" name="is_home">否
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">状态</label>
                <div class="col-sm-10">
                    <input type="radio"  value="1" name="status" checked >正常
                    <input type="radio"  value="2" name="status" >禁用
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">所属分类</label>
                <div class="col-sm-8">
                    <select name="category_id" class="form-control">
                        {volist name="categories" id="vo"}
                        <option value="{$vo.id}">{$vo.name}</option>
                        {/volist}
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">所属类别</label>
                <div class="col-sm-8">
                    <select name="class_ids" class="form-control">
                        {volist name="class" id="vo"}
                        <option value="{$vo.id}">{$vo.name}</option>
                        {/volist}
                    </select>
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">活动开始时间</label>
                <div class="col-sm-8">
                    <input type="datetime-local" class="form-control" name="start_time" placeholder="开始时间">
                </div>
            </div>

            <div class="form-group">
                <label class="col-sm-2 control-label">活动结束时间</label>
                <div class="col-sm-8">
                    <input type="datetime-local" class="form-control"  name="end_time" placeholder="结束时间">
                </div>
            </div>

            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-4">
                    <button type="submit" class="btn btn-info pull-right">提交</button>
                </div>
            </div>
        </form>
    </div>
    <!-- /.box-body -->
</div>
{/block}

{block name="js"}
<script type="text/javascript" src="/ueditor/ueditor.config.js"></script>
<!-- 编辑器源码文件 -->
<script type="text/javascript" src="/ueditor/ueditor.all.js"></script>
<!-- 实例化编辑器 -->
<script type="text/javascript">
    //var ue = UE.getEditor('container');
    var ue = UE.getEditor('container', {
        autoHeightEnabled:false,
        initialFrameHeight:420
    });
</script>
{/block}